From e16bc52a1de140578b8b61581fd293386f276ed1 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Mon, 9 Jul 2007 08:33:02 -0600 Subject: [PATCH] [IA64] Rename NUM_MEM_DESC to NUM_EXTRA_MEM_DESC and reduce it. Signed-off-by: Isaku Yamahata --- xen/arch/ia64/xen/dom_fw_utils.c | 27 +++++++++++++++++++++++---- xen/include/asm-ia64/dom_fw_common.h | 1 - 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/xen/arch/ia64/xen/dom_fw_utils.c b/xen/arch/ia64/xen/dom_fw_utils.c index a28394a836..3cf1917913 100644 --- a/xen/arch/ia64/xen/dom_fw_utils.c +++ b/xen/arch/ia64/xen/dom_fw_utils.c @@ -250,10 +250,28 @@ int dom_fw_setup(domain_t * d, unsigned long bp_mpa, unsigned long maxmem) imva_hypercall_base = (unsigned long)domain_mpa_to_imva (d, FW_HYPERCALL_BASE_PADDR); + /* + * dom_fw_init() + * - [FW_HYPERCALL_BASE_PADDR, FW_HYPERCALL_END_PADDR) + * - [FW_ACPI_BASE_PADDR, FW_ACPI_END_PADDR) + * - [FW_TABLES_BASE_PADDR, tables->fw_tables_end_paddr) + * + * complete_dom0_memmap() for dom0 + * - real machine memory map + * - memmap_info by setup_dom0_memmap_info() + * + * complete_domu_memmap() for old domu builder + * - I/O port + * - conventional memory + * - memmap_info + */ +#define NUM_EXTRA_MEM_DESCS 4 + /* Estimate necessary efi memmap size and allocate memory */ fw_tables_size = sizeof(*fw_tables) + (ia64_boot_param->efi_memmap_size / - ia64_boot_param->efi_memdesc_size + NUM_MEM_DESCS) * + ia64_boot_param->efi_memdesc_size + + NUM_EXTRA_MEM_DESCS) * sizeof(fw_tables->efi_memmap[0]); if (fw_tables_size < FW_TABLES_END_PADDR_MIN - FW_TABLES_BASE_PADDR) @@ -301,11 +319,12 @@ int dom_fw_setup(domain_t * d, unsigned long bp_mpa, unsigned long maxmem) if (sizeof(*fw_tables) + fw_tables->num_mds * sizeof(fw_tables->efi_memmap[0]) > fw_tables_size) { - panic("EFI memmap too large. Increase NUM_MEM_DESCS.\n" + panic("EFI memmap too large. " + "Increase NUM_EXTRA_MEM_DESCS.\n" "fw_table_size %ld > %ld num_mds %ld " - "NUM_MEM_DESCS %d.\n", + "NUM_EXTRA_MEM_DESCS %d.\n", fw_tables_size, fw_tables->fw_tables_size, - fw_tables->num_mds, NUM_MEM_DESCS); + fw_tables->num_mds, NUM_EXTRA_MEM_DESCS); } fw_tables_size = sizeof(*fw_tables) + fw_tables->num_mds * sizeof(fw_tables->efi_memmap[0]); diff --git a/xen/include/asm-ia64/dom_fw_common.h b/xen/include/asm-ia64/dom_fw_common.h index de24d253bc..2e1ef6216e 100644 --- a/xen/include/asm-ia64/dom_fw_common.h +++ b/xen/include/asm-ia64/dom_fw_common.h @@ -51,7 +51,6 @@ typedef struct xc_dom_image domain_t; #define NFUNCPTRS 16 #define NUM_EFI_SYS_TABLES 6 -#define NUM_MEM_DESCS 64 //large enough struct fw_tables { efi_system_table_t efi_systab; -- 2.30.2